package com.dcm.item.mapper;

import com.dcm.item.entity.SpecificationEntity;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Classname: SpecMapper
 * @Author  Mengxiangjian
 * Date: 2021/3/22 14:13
 * Version V 1.0
 */
@Mapper
@Repository
public interface SpecMapper {
    /**
     * 查询所有
     * @return
     */
     List<SpecificationEntity> findAll();

    /**
     * 添加
     * @param specification
     */
    void add(SpecificationEntity specification);

    /**
     * 根据id删除
     * @param id
     */
    void delete(Long id);

    /**
     * 修改
     * @param specification
     */
    void update(SpecificationEntity specification);

    /**
     * 根据名字查询
     * @param name
     * @return
     */
    SpecificationEntity find(String name);
}
